<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>

<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<!DOCTYPE html>
<html>
<head>
    <meta charset="UTF-8">
    <title></title>
    <meta content="width=device-width,initial-scale=1.0,maximum-scale=1.0,user-scalable=0" name="viewport" />
    <meta content="yes" name="apple-mobile-web-app-capable" />
    <meta content="black" name="apple-mobile-web-app-status-bar-style" />
    <meta content="telephone=no" name="format-detection" />
    <!-- 引入YDUI样式 -->
    <link rel="stylesheet" href="/common/build/css/ydui.css" />

</head>
<body>
<div class="m-cell">
    <form id="f1" action="/com/imelite/qyh/NPSAction/get_NPSTotoal.do">
        <div class="cell-item">
            <div class="cell-left">Year：</div>
            <div class="cell-right">
                <input id="year" type="number" class="cell-input" placeholder="请输入年份" name="year" value="${dcwj.year}" autocomplete="off" />
                <a id="refreshBtn" href="javascript:;" class="btn btn-primary" style="float: right;"><i class="icon-refresh"></i></a>
            </div>
        </div>
        <div class="cell-item">
            <label class="cell-right cell-arrow">
                <select id="quarter" class="cell-select" name="quarter">
                    <option value="0">Quarter</option>
                    <option value="1" <c:if test="${dcwj.quarter=='1'}"> selected </c:if> >Quarter 1</option>
                    <option value="2" <c:if test="${dcwj.quarter=='2'}"> selected </c:if> >Quarter 2</option>
                    <option value="3" <c:if test="${dcwj.quarter=='3'}"> selected </c:if> >Quarter 3</option>
                    <option value="4" <c:if test="${dcwj.quarter=='4'}"> selected </c:if> >Quarter 4</option>
                </select>
            </label>
        </div>
    </form>

    <c:forEach var="item" items="${npsBeanList}">
        <a class="cell-item" href="javascript:;">
            <div class="cell-left">
            <span class="cell-icon">
                <i class="icon-home"></i>${item.iddepSname}
                <span class="badge badge-primary">Score=${item.score}%</span>
            </span>

            </div>
            <div class="cell-right cell-arrow">Detail</div>
        </a>
    </c:forEach>
</div>

<!-- 引入YDUI自适应解决方案类库 -->
<script src="/common/build/js/ydui.flexible.js"></script>
<!-- 引入jQuery 2.0+ -->
<script src="http://apps.bdimg.com/libs/jquery/2.1.4/jquery.min.js"></script>
<!-- 引入YDUI脚本 -->
<script src="/common/build/js/ydui.js"></script>
<script>

    $('#refreshBtn').click(function(){
        var year=$('#year').val();
        var quarter=jQuery("#quarter  option:selected").val();
        if(quarter==0){
            YDUI.dialog.alert('请选择季度！或者输入年份有错误');
        }else{
            $('#f1').submit();
        }
    });
</script>
</body>
</html>